package pa165.dominatingspecies.frontend.environment;

import org.apache.wicket.markup.html.link.Link;
import org.springframework.security.access.prepost.PreAuthorize;

/**
 *
 * @author Stanislau Dubrouski
 */
@PreAuthorize("hasRole('WORKER')")
public class EnvironmentDetailsLink extends Link {

    final Long envId;
    
    public EnvironmentDetailsLink(String id, Long envId) {
        super(id);
        this.envId = envId;
    }

    @Override
    public void onClick() {
        EnvironmentDetailsPage ep = new EnvironmentDetailsPage(envId);
        setResponsePage(ep);
    }
}
